module.exports = function(lab) {
    return {
        "ihello": async (session,params) => {
            lab.mysql.find("post","7564c57c-9667-4a97-8c0c-9eba8a48b54a").then(async (res)=> {
                // res.text = 'hello';
                // let record = await lab.mysql.update("post",res);
                lab.mysql.delete("post",{
                    text: 123,
                    title: "test"
                })
            })
            return lab.mysql.query("post",{
                conditions: ["id = ?"],
                limit: 10,
                params: ["7564c57c-9667-4a97-8c0c-9eba8a48b54a"],
            }).then(res=> {
                return res;
            })
        },
        "logout": async(session) => {
            session.destroy()
        },
        "getUserInfo": async (session) => {
            return {
                "getUserInfo": 456
            }
        }
    }
}